BM_CODE_ROOT = $(shell cd ../../../; pwd)
include $(BM_CODE_ROOT)/Rules.make

SRC += $(wildcard *.cpp)
OBJS := $(patsubst %.cpp, %.o, $(SRC))


EXE1 = echo_process_tcp_svr

EXE2 = echo_tcp_cli

EXE3 = echo_select_tcp_svr

EXE4 =	echo_udp_svr

EXE5 =	echo_udp_cli

EXE6 = simple_udp_svr

EXE7 = simple_udp_conn_cli

EXE8 = simple_udp_cli

all : $(OBJS)  $(EXE1) $(EXE2) $(EXE3) $(EXE4) $(EXE5) $(EXE6) $(EXE7) $(EXE8)
$(EXE1):
	$(CXX) $(CXXFLAGS) $(EXE1).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE2):
	$(CXX) $(CXXFLAGS) $(EXE2).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE3):
	$(CXX) $(CXXFLAGS) $(EXE3).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE4):
	$(CXX) $(CXXFLAGS) $(EXE4).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE5):
	$(CXX) $(CXXFLAGS) $(EXE5).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE6):
	$(CXX) $(CXXFLAGS) $(EXE6).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE7):
	$(CXX) $(CXXFLAGS) $(EXE7).o  -o  $@ $^ $(INCDIR) $(LIBS)

$(EXE8):
	$(CXX) $(CXXFLAGS) $(EXE8).o  -o  $@ $^ $(INCDIR) $(LIBS)
clean:  
	rm $(OBJS) $(EXE1) $(EXE2) $(EXE3) $(EXE4) $(EXE5) $(EXE6)  $(EXE7) $(EXE8) core* -f
